#define _CRT_SECURE_NO_WARNINGS 1 
#include <stdio.h>
#include <math.h>
#define SYMBOL 'i'
int main()
{
    /**********Bigin**********/
    double a, b, c, det, t, p, k,x1,x2;
    scanf("%lf,%lf,%lf", &a, &b, &c);
    det = b * b - 4 * a * c;
    t = -(b * b - 4 * a * c);
    if (det > 0) {
        x1 = (-b + sqrt(det)) / (2 * a);
        x2 = (-b - sqrt(det)) / (2 * a);
        printf("x1=%.5lf\nx2=%.5lf", x1, x2);
    }
    if (det == 0) {
        x1 = x2 = (-b) / (2 * a);
        printf("x1=x2=%.5lf", x1);
    }
    if (det < 0) {
        p = (-b) / (2 * a);
        k = sqrt(t) / (2 * a);
        printf("x1=%.5lf+%.5lf%c\nx2=%.5lf-%.5lf%c", p, k, SYMBOL, p, k, SYMBOL);
    }


    /**********End**********/
    return 0;
}
